

<template>
    <div style="height:220px">
        <div style="height:190px">
            <div> 请输入报告发放延时时间（单位：小时）：<el-input v-model="Delay.hour" type="number" style="width:100px" ref="refhour"></el-input>

            </div>
            <div>报告延时原因：</div>
            <div>
                <el-input v-model="Delay.content" type="textarea" :rows="7"></el-input>
            </div>
        </div>
        <div style="float:right">
            <el-button type="primary" @click="RptDelaySave">确认</el-button>
            <el-button @click="RptDelayCancel">取 消</el-button>
        </div>
    </div>
</template>

<script type="text/javascript">
export default {
    name: "rm_devalertinfo",
    props: {
        barcodes: { type: String },
    },
    data() {
        return {
            dialogRptDelay: false,
            Delay: { hour: "", content: "" },
        };
    },
    created() {},
    computed: {},
    watch: {},
    mounted() {
        if (this.$refs.refhour)
            setTimeout(() => {
                this.$refs.refhour.focus();
            }, 10);
        this.Delay.hour = "";
        this.content = "";
    },
    methods: {
        //增加报告延迟功能
        RptDelaySave() {
            if (this.Delay.hour == "") {
                this.$alert("请填写正确的延迟时间！", "提示");
                return false;
            }
            if (this.Delay.content == "") {
                this.$alert("请填写延迟原因！", "提示");
                return false;
            }
            this.$tool
                .request({
                    url: "LIS/LIS4/LIS430",
                    method: "post",
                    data: {
                        action: "RptDelaySave",
                        barcodes: this.barcodes,
                        ...this.Delay,
                    },
                })
                .then((res) => {
                    if (res.errcode == "1") {
                        this.$emit("change", "1", res.errmsg);
                    } else {
                        this.$emit("change", "0", res.errmsg);
                    }
                })
                .catch((e) => {});
        },
        RptDelayCancel() {
            this.$emit("change", "close");
        },
    },
};
</Script>

<style scoped>
</style>